3.313 \(\int \frac{(d+e x) (2+x+3 x^2-5 x^3+4 x^4)}{(3+2 x+5 x^2)^2} \, dx\)

Optimal. Leaf size=97 \[ -\frac{(423 x+1367) (d+e x)}{3500 \left (5 x^2+2 x+3\right )}-\frac{(205 d-103 e) \log \left (5 x^2+2 x+3\right )}{1250}+\frac{1}{125} x (20 d-41 e)+\frac{(6565 d+21171 e) \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{17500 \sqrt{14}}+\frac{2 e x^2}{25} \]

[Out]

((20*d - 41*e)*x)/125 + (2*e*x^2)/25 - ((1367 + 423*x)*(d + e*x))/(3500*(3 + 2*x + 5*x^2)) + ((6565*d + 21171*
e)*ArcTan[(1 + 5*x)/Sqrt[14]])/(17500*Sqrt[14]) - ((205*d - 103*e)*Log[3 + 2*x + 5*x^2])/1250

________________________________________________________________________________________

Rubi [A]  time = 0.193461, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {1644, 1657, 634, 618, 204, 628} \[ -\frac{(423 x+1367) (d+e x)}{3500 \left (5 x^2+2 x+3\right )}-\frac{(205 d-103 e) \log \left (5 x^2+2 x+3\right )}{1250}+\frac{1}{125} x (20 d-41 e)+\frac{(6565 d+21171 e) \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )}{17500 \sqrt{14}}+\frac{2 e x^2}{25} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(2 + x + 3*x^2 - 5*x^3 + 4*x^4))/(3 + 2*x + 5*x^2)^2,x]

[Out]

((20*d - 41*e)*x)/125 + (2*e*x^2)/25 - ((1367 + 423*x)*(d + e*x))/(3500*(3 + 2*x + 5*x^2)) + ((6565*d + 21171*
e)*ArcTan[(1 + 5*x)/Sqrt[14]])/(17500*Sqrt[14]) - ((205*d - 103*e)*Log[3 + 2*x + 5*x^2])/1250

Rule 1644

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = Polynomi
alQuotient[Pq, a + b*x + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[Po
lynomialRemainder[Pq, a + b*x + c*x^2, x], x, 1]}, Simp[((d + e*x)^m*(a + b*x + c*x^2)^(p + 1)*(f*b - 2*a*g +
(2*c*f - b*g)*x))/((p + 1)*(b^2 - 4*a*c)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(d + e*x)^(m - 1)*(a + b*x
 + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*(d + e*x)*Q + g*(2*a*e*m + b*d*(2*p + 3)) - f*(b*e*m + 2*c
*d*(2*p + 3)) - e*(2*c*f - b*g)*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && PolyQ[Pq, x] && N
eQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 0] && (IntegerQ[p] ||  !IntegerQ[m
] ||  !RationalQ[a, b, c, d, e]) &&  !(IGtQ[m, 0] && RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2,
 0]))

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{(d+e x) \left (2+x+3 x^2-5 x^3+4 x^4\right )}{\left (3+2 x+5 x^2\right )^2} \, dx &=-\frac{(1367+423 x) (d+e x)}{3500 \left (3+2 x+5 x^2\right )}+\frac{1}{56} \int \frac{\frac{2}{125} (1845 d+1367 e)-\frac{168}{125} (55 d-27 e) x+\frac{56}{25} (20 d-33 e) x^2+\frac{224 e x^3}{5}}{3+2 x+5 x^2} \, dx\\ &=-\frac{(1367+423 x) (d+e x)}{3500 \left (3+2 x+5 x^2\right )}+\frac{1}{56} \int \left (\frac{56}{125} (20 d-41 e)+\frac{224 e x}{25}+\frac{2 (165 d+4811 e-28 (205 d-103 e) x)}{125 \left (3+2 x+5 x^2\right )}\right ) \, dx\\ &=\frac{1}{125} (20 d-41 e) x+\frac{2 e x^2}{25}-\frac{(1367+423 x) (d+e x)}{3500 \left (3+2 x+5 x^2\right )}+\frac{\int \frac{165 d+4811 e-28 (205 d-103 e) x}{3+2 x+5 x^2} \, dx}{3500}\\ &=\frac{1}{125} (20 d-41 e) x+\frac{2 e x^2}{25}-\frac{(1367+423 x) (d+e x)}{3500 \left (3+2 x+5 x^2\right )}+\frac{(-205 d+103 e) \int \frac{2+10 x}{3+2 x+5 x^2} \, dx}{1250}+\frac{(6565 d+21171 e) \int \frac{1}{3+2 x+5 x^2} \, dx}{17500}\\ &=\frac{1}{125} (20 d-41 e) x+\frac{2 e x^2}{25}-\frac{(1367+423 x) (d+e x)}{3500 \left (3+2 x+5 x^2\right )}-\frac{(205 d-103 e) \log \left (3+2 x+5 x^2\right )}{1250}+\frac{(-6565 d-21171 e) \operatorname{Subst}\left (\int \frac{1}{-56-x^2} \, dx,x,2+10 x\right )}{8750}\\ &=\frac{1}{125} (20 d-41 e) x+\frac{2 e x^2}{25}-\frac{(1367+423 x) (d+e x)}{3500 \left (3+2 x+5 x^2\right )}+\frac{(6565 d+21171 e) \tan ^{-1}\left (\frac{1+5 x}{\sqrt{14}}\right )}{17500 \sqrt{14}}-\frac{(205 d-103 e) \log \left (3+2 x+5 x^2\right )}{1250}\\ \end{align*}

Mathematica [A]  time = 0.0662719, size = 96, normalized size = 0.99 \[ \frac{-\frac{14 (5 d (423 x+1367)+e (5989 x-1269))}{5 x^2+2 x+3}+196 (103 e-205 d) \log \left (5 x^2+2 x+3\right )+1960 x (20 d-41 e)+\sqrt{14} (6565 d+21171 e) \tan ^{-1}\left (\frac{5 x+1}{\sqrt{14}}\right )+19600 e x^2}{245000} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(2 + x + 3*x^2 - 5*x^3 + 4*x^4))/(3 + 2*x + 5*x^2)^2,x]

[Out]

(1960*(20*d - 41*e)*x + 19600*e*x^2 - (14*(5*d*(1367 + 423*x) + e*(-1269 + 5989*x)))/(3 + 2*x + 5*x^2) + Sqrt[
14]*(6565*d + 21171*e)*ArcTan[(1 + 5*x)/Sqrt[14]] + 196*(-205*d + 103*e)*Log[3 + 2*x + 5*x^2])/245000

________________________________________________________________________________________

Maple [A]  time = 0.055, size = 106, normalized size = 1.1 \begin{align*}{\frac{2\,e{x}^{2}}{25}}+{\frac{4\,dx}{25}}-{\frac{41\,ex}{125}}-{\frac{1}{125} \left ( \left ({\frac{423\,d}{140}}+{\frac{5989\,e}{700}} \right ) x+{\frac{1367\,d}{140}}-{\frac{1269\,e}{700}} \right ) \left ({x}^{2}+{\frac{2\,x}{5}}+{\frac{3}{5}} \right ) ^{-1}}-{\frac{41\,\ln \left ( 5\,{x}^{2}+2\,x+3 \right ) d}{250}}+{\frac{103\,e\ln \left ( 5\,{x}^{2}+2\,x+3 \right ) }{1250}}+{\frac{1313\,\sqrt{14}d}{49000}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) }+{\frac{21171\,\sqrt{14}e}{245000}\arctan \left ({\frac{ \left ( 10\,x+2 \right ) \sqrt{14}}{28}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3)^2,x)

[Out]

2/25*e*x^2+4/25*d*x-41/125*e*x-1/125*((423/140*d+5989/700*e)*x+1367/140*d-1269/700*e)/(x^2+2/5*x+3/5)-41/250*l
n(5*x^2+2*x+3)*d+103/1250*e*ln(5*x^2+2*x+3)+1313/49000*14^(1/2)*arctan(1/28*(10*x+2)*14^(1/2))*d+21171/245000*
14^(1/2)*arctan(1/28*(10*x+2)*14^(1/2))*e

________________________________________________________________________________________

Maxima [A]  time = 1.49595, size = 122, normalized size = 1.26 \begin{align*} \frac{2}{25} \, e x^{2} + \frac{1}{245000} \, \sqrt{14}{\left (6565 \, d + 21171 \, e\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{1}{125} \,{\left (20 \, d - 41 \, e\right )} x - \frac{1}{1250} \,{\left (205 \, d - 103 \, e\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) - \frac{{\left (2115 \, d + 5989 \, e\right )} x + 6835 \, d - 1269 \, e}{17500 \,{\left (5 \, x^{2} + 2 \, x + 3\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3)^2,x, algorithm="maxima")

[Out]

2/25*e*x^2 + 1/245000*sqrt(14)*(6565*d + 21171*e)*arctan(1/14*sqrt(14)*(5*x + 1)) + 1/125*(20*d - 41*e)*x - 1/
1250*(205*d - 103*e)*log(5*x^2 + 2*x + 3) - 1/17500*((2115*d + 5989*e)*x + 6835*d - 1269*e)/(5*x^2 + 2*x + 3)

________________________________________________________________________________________

Fricas [A]  time = 1.20687, size = 462, normalized size = 4.76 \begin{align*} \frac{98000 \, e x^{4} + 9800 \,{\left (20 \, d - 37 \, e\right )} x^{3} + 7840 \,{\left (10 \, d - 13 \, e\right )} x^{2} + \sqrt{14}{\left (5 \,{\left (6565 \, d + 21171 \, e\right )} x^{2} + 2 \,{\left (6565 \, d + 21171 \, e\right )} x + 19695 \, d + 63513 \, e\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + 14 \,{\left (6285 \, d - 23209 \, e\right )} x - 196 \,{\left (5 \,{\left (205 \, d - 103 \, e\right )} x^{2} + 2 \,{\left (205 \, d - 103 \, e\right )} x + 615 \, d - 309 \, e\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) - 95690 \, d + 17766 \, e}{245000 \,{\left (5 \, x^{2} + 2 \, x + 3\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3)^2,x, algorithm="fricas")

[Out]

1/245000*(98000*e*x^4 + 9800*(20*d - 37*e)*x^3 + 7840*(10*d - 13*e)*x^2 + sqrt(14)*(5*(6565*d + 21171*e)*x^2 +
 2*(6565*d + 21171*e)*x + 19695*d + 63513*e)*arctan(1/14*sqrt(14)*(5*x + 1)) + 14*(6285*d - 23209*e)*x - 196*(
5*(205*d - 103*e)*x^2 + 2*(205*d - 103*e)*x + 615*d - 309*e)*log(5*x^2 + 2*x + 3) - 95690*d + 17766*e)/(5*x^2
+ 2*x + 3)

________________________________________________________________________________________

Sympy [C]  time = 1.11261, size = 163, normalized size = 1.68 \begin{align*} \frac{2 e x^{2}}{25} + x \left (\frac{4 d}{25} - \frac{41 e}{125}\right ) + \left (- \frac{41 d}{250} + \frac{103 e}{1250} - \frac{\sqrt{14} i \left (6565 d + 21171 e\right )}{490000}\right ) \log{\left (x + \frac{1313 d + \frac{21171 e}{5} - \frac{\sqrt{14} i \left (6565 d + 21171 e\right )}{5}}{6565 d + 21171 e} \right )} + \left (- \frac{41 d}{250} + \frac{103 e}{1250} + \frac{\sqrt{14} i \left (6565 d + 21171 e\right )}{490000}\right ) \log{\left (x + \frac{1313 d + \frac{21171 e}{5} + \frac{\sqrt{14} i \left (6565 d + 21171 e\right )}{5}}{6565 d + 21171 e} \right )} - \frac{6835 d - 1269 e + x \left (2115 d + 5989 e\right )}{87500 x^{2} + 35000 x + 52500} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(4*x**4-5*x**3+3*x**2+x+2)/(5*x**2+2*x+3)**2,x)

[Out]

2*e*x**2/25 + x*(4*d/25 - 41*e/125) + (-41*d/250 + 103*e/1250 - sqrt(14)*I*(6565*d + 21171*e)/490000)*log(x +
(1313*d + 21171*e/5 - sqrt(14)*I*(6565*d + 21171*e)/5)/(6565*d + 21171*e)) + (-41*d/250 + 103*e/1250 + sqrt(14
)*I*(6565*d + 21171*e)/490000)*log(x + (1313*d + 21171*e/5 + sqrt(14)*I*(6565*d + 21171*e)/5)/(6565*d + 21171*
e)) - (6835*d - 1269*e + x*(2115*d + 5989*e))/(87500*x**2 + 35000*x + 52500)

________________________________________________________________________________________

Giac [A]  time = 1.14407, size = 127, normalized size = 1.31 \begin{align*} \frac{2}{25} \, x^{2} e + \frac{1}{245000} \, \sqrt{14}{\left (6565 \, d + 21171 \, e\right )} \arctan \left (\frac{1}{14} \, \sqrt{14}{\left (5 \, x + 1\right )}\right ) + \frac{4}{25} \, d x - \frac{41}{125} \, x e - \frac{1}{1250} \,{\left (205 \, d - 103 \, e\right )} \log \left (5 \, x^{2} + 2 \, x + 3\right ) - \frac{{\left (2115 \, d + 5989 \, e\right )} x + 6835 \, d - 1269 \, e}{17500 \,{\left (5 \, x^{2} + 2 \, x + 3\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(4*x^4-5*x^3+3*x^2+x+2)/(5*x^2+2*x+3)^2,x, algorithm="giac")

[Out]

2/25*x^2*e + 1/245000*sqrt(14)*(6565*d + 21171*e)*arctan(1/14*sqrt(14)*(5*x + 1)) + 4/25*d*x - 41/125*x*e - 1/
1250*(205*d - 103*e)*log(5*x^2 + 2*x + 3) - 1/17500*((2115*d + 5989*e)*x + 6835*d - 1269*e)/(5*x^2 + 2*x + 3)